Skip to content

feat(coding-agent): add namespaced todo projections - #6522

Open
panosAthDBX wants to merge 34 commits into
can1357:mainfrom
panosAthDBX:feat/namespaced-todo-projection
Open

feat(coding-agent): add namespaced todo projections#6522
panosAthDBX wants to merge 34 commits into
can1357:mainfrom
panosAthDBX:feat/namespaced-todo-projection

Conversation

@panosAthDBX

@panosAthDBX panosAthDBX commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

  • add an extension-owned, namespaced todo projection API that remains separate from native session todos
  • forward projection updates through ExtensionRunner in interactive, ACP, executor, and headless contexts
  • clear projections across new, switch, branch, and tree lifecycle boundaries
  • document the extension API and add focused projection/runtime regression coverage

Primary Babysitter integration PR: a5c-ai/babysitter#1582. It contains and supersedes the underlying deterministic-driver PR a5c-ai/babysitter#1580.
Exact one-commit Babysitter fork stack: panosAthDBX/babysitter#1.

Why

Babysitter's deterministic OMP driver needs to publish lifecycle progress without mutating OMP's native todo list or transcript state. Namespacing gives extensions isolated ownership, deterministic ordering, defensive cloning, and lifecycle-safe cleanup.

Testing

  • bun test packages/coding-agent/test/todo-projection.test.ts packages/coding-agent/test/tools/todo.test.ts packages/coding-agent/test/modes/controllers/todo-command-controller.test.ts packages/coding-agent/test/interactive-mode-todo-clear.test.ts packages/coding-agent/test/event-controller-todo-reminder.test.ts packages/coding-agent/test/extensions-runner.test.ts packages/coding-agent/src/modes/controllers/extension-ui-controller.test.ts packages/coding-agent/test/agent-session-tree-navigation.test.ts — 149 passed, 10 skipped, 0 failed (416 assertions)
  • bun test packages/coding-agent/test/sdk-credential-disabled-bridge.test.ts — 9 passed, 0 failed (42 assertions)
  • bun test packages/coding-agent/test/todo-projection.test.ts packages/coding-agent/test/interactive-mode-todo-clear.test.ts packages/coding-agent/test/session-focus-controller.test.ts packages/coding-agent/test/agent-hub-activate.test.ts — 36 passed, 0 failed (144 assertions)
  • bun --cwd=packages/coding-agent run check:types — passed
  • bun --cwd=packages/coding-agent run build — passed

Compatibility / risk notes:

  • API is additive and keeps extension projections isolated from native todos and transcript entries.
  • Projection state is cleared at session lifecycle boundaries; no-op updates suppress events.
  • Projected labels are centrally sanitized before tab/newline handling and width truncation.
  • Focused Agent Hub sessions render their own todo projections.
  • Headless Bun runs emitted harmless Supacode /dev/tty ENXIO warnings.
  • The SDK bridge file was run separately to avoid cross-file global-state interference in the combined Bun process.
  • Project-wide suites, formatters, and linters were intentionally not run.

  • bun check passes (not run; focused tests, package typecheck, and package build passed)
  • Tested locally
  • CHANGELOG updated

@roboomp roboomp added agent Agent runtime planning and orchestration feat review:p2 sdk SDK and extension integration surface triaged tui Terminal UI rendering and display labels Jul 24, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba850733bc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/modes/interactive-mode.ts Outdated

@roboomp roboomp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @panosAthDBX — clean, tightly-scoped feature with good defensive design (validate+clone at the boundary, no-op suppression, lifecycle clearing at dispose/new/switch/branch) and solid contract-level tests (isolation from native todos/transcript, namespace ordering, terminal states, cleanup on session boundaries).

Ranked review:p2: this is an additive public extension API (ExtensionAPI.setTodoProjection / ExtensionActions) added to serve an external Babysitter integration with no linked issue, so accepting the new surface into core is a maintainer call rather than an auto-merge.

Findings:

  • should-fix: renderTodoProjectionLines renders extension-owned strings without replaceTabs()/truncateToWidth(), violating the TUI-sanitization convention (the subagent HUD path already sanitizes).
  • should-fix (not inline-able, no diff line): no CHANGELOG entry under ## [Unreleased] for packages/coding-agent; the PR body acknowledges skipping it, but the convention requires it — docs/extensions.md doesn't substitute.
  • nit: redundant if/?. guards on the required setTodoProjection action (runner.ts:285, loader.ts:269).

No correctness or isolation issues found; native todos, transcript, and reminders are untouched as claimed.

Comment on lines +411 to +416
export function renderTodoProjectionLines(projections: readonly NamespacedTodoProjection[]): string[] {
const checkbox = theme.checkbox;
const formatTask = (task: TodoProjectionItem): string => {
switch (task.status) {
case "in_progress":
return theme.fg("accent", `${checkbox.unchecked} ${task.content}`);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should-fix: extension-supplied strings are rendered into the HUD unsanitized. task.content, phase.name, and projection.namespace flow straight into the Text widget (joined with \n) with no replaceTabs() / truncateToWidth(). Per the repo TUI-sanitization convention every render path must sanitize: an embedded tab produces visual holes and a long/multi-line value overflows or injects extra rows. Note the sibling subagent HUD path already does this (interactive-mode.ts:390,396 wrap with replaceTabs() + truncateToWidth(...)), so there's an in-repo precedent to mirror here. Projection content is externally owned (extensions), so this is more exposed than native todos.

this.runtime.setThinkingLevel = actions.setThinkingLevel;
this.runtime.getSessionName = actions.getSessionName;
this.runtime.setSessionName = actions.setSessionName;
if (actions.setTodoProjection) this.runtime.setTodoProjection = actions.setTodoProjection;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: ExtensionActions.setTodoProjection is a required member (types.ts:1420), so this if (actions.setTodoProjection) guard is always truthy and inconsistent with every sibling above (e.g. setSessionName on line 284 assigns unconditionally). Same for the redundant optional-chain this.runtime.setTodoProjection?.(...) in loader.ts:269. Either drop the guards, or make the member genuinely optional if some construction site legitimately omits it.

@roboomp roboomp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @panosAthDBX — clean, tightly-scoped feature with good defensive design (validate+clone at the boundary, no-op suppression, lifecycle clearing at dispose/new/switch/branch) and solid contract-level tests. Ranked review:p2: additive public extension API (ExtensionAPI.setTodoProjection/ExtensionActions) added for an external Babysitter integration with no linked issue, so accepting the new surface is a maintainer call.

Findings: should-fix — renderTodoProjectionLines renders extension-owned strings without replaceTabs()/truncateToWidth() (TUI-sanitization convention; subagent HUD already sanitizes); should-fix — no CHANGELOG [Unreleased] entry for packages/coding-agent; nit — redundant if/?. guards on the required setTodoProjection action. No correctness or isolation issues; native todos/transcript/reminders untouched as claimed.

…o-projection

# Conflicts:
#	docs/extensions.md
#	packages/coding-agent/src/extensibility/extensions/types.ts
#	packages/coding-agent/src/session/agent-session.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2b3a7e915

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/modes/interactive-mode.ts Outdated
Comment thread packages/coding-agent/src/modes/interactive-mode.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82937b753c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/session/agent-session.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fa6fafd9b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/modes/interactive-mode.ts
Comment thread packages/coding-agent/src/modes/interactive-mode.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 71a5b82e26

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/modes/interactive-mode.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 218a31174a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50b2066ce2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/session/agent-session-events.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab8b97d304

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/session/agent-session-events.ts Outdated
Comment thread packages/coding-agent/src/modes/runtime-init.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12d1272a69

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/modes/acp/acp-event-mapper.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e60f8c6483

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/modes/runtime-init.ts
Comment thread packages/coding-agent/src/task/executor.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2fb602197

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/modes/rpc/rpc-mode.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34a75e92c3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa5fee6158

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

export function renderTodoProjectionLines(projections: readonly NamespacedTodoProjection[], columns: number): string[] {
const checkbox = theme.checkbox;
const formatProjectionText = (value: string, maxWidth: number): string =>
truncateToWidth(replaceTabs(sanitizeText(value)).replace(/[\r\n]+/g, " "), Math.max(1, maxWidth));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Shorten projected home paths before rendering

When a projected namespace, phase, or task label is an absolute path under the user's home directory, this shared formatter strips controls/tabs and truncates it but never applies shortenPath(), so the anchored HUD can still expose /home/<user>/... or /Users/<user>/... in extension-rendered status text. The fresh evidence after the earlier sanitizer fixes is that this central projection formatter now handles every displayed projection string but still omits the repository-required path shortening before truncation.

AGENTS.md reference: AGENTS.md:L191-L199

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Agent runtime planning and orchestration feat review:p2 sdk SDK and extension integration surface triaged tui Terminal UI rendering and display

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants